<?php
include_once("./function.php");
//print_r($_GET);die;//Array ( [ifshow] => 1 [cid] => 1 )

if(isset($_GET['ifshow']))
{
	extract($_GET);//$ifshow $cid
	//$ifshow=trim($ifshow);
	//$cid=trim($cid);
	if($ifshow=="1")
	{
		$sql="update ts_news_cate set ifshow='0' where cid=$cid";
		$res=mysqli_query($link,$sql);
		if($res)
		{
			if(mysqli_affected_rows($link)>0)
			{
				header("location:./news_conf.php");exit;
			}
		}
	}
	else
	{
		$sql="update ts_news_cate set ifshow='1' where cid=$cid";
		$res=mysqli_query($link,$sql);
		if($res)
		{
			if(mysqli_affected_rows($link)>0)
			{
				header("location:./news_conf.php");exit;
			}
		}
	}
 
}
?>